<div class="form" style="background:url('<?php echo Yii::app()->request->baseUrl; ?>/themes/hachimaki/imagens/bg5.png') repeat scroll top center transparent; height:auto; padding-top:8%; width:370px; text-align:left; line-height: 1; border: 3px solid #CCCCCC;">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'cad-entradas-form',
	'enableAjaxValidation'=>false,
)); ?>
	<h1 class="titulo_login" style="color: #444444;
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 34px;
    margin-top: -53px;
    text-align: center;
    width: 100%;
    z-index: -10000;">Cadastrar Entrada</h1>
    
	<p class="note">Campos com <span class="required">*</span> são obrigatórios.</p>
<?php 
       //caso aja parcelas em aberto
      if(isset($condition) && $condition == false){
       echo '<font color="red">Existem parcelas em aberto!</font>';
       echo '    <font color="red"><a href="index.php?r=cad_parcela/myadmin&id='.$_GET['id'].'">Verifique aqui</a></font>';
      } 
?>
	<?php echo $form->errorSummary($model); ?>

	<div class="row" style="text-align:right; width:370px; padding:0; margin:0;">
		<?php echo $form->labelEx($model,'cod_forma'); ?>
                <?php echo $form->dropDownList($model,'cod_forma', cad_forma::loadTableForma()); ?>
		<?php echo $form->error($model,'cod_forma'); ?>
	</div>

	<div class="row" style="text-align:right; width:370px; padding:0; margin:0;">
		<?php echo $form->labelEx($model,'cod_aluno'); ?>
                <?php echo $form->dropDownList($model,'cod_aluno', cad_aluno::loadTableAluno()); ?>
		<?php echo $form->error($model,'cod_aluno'); ?>

	</div>

	<div class="row" style="text-align:right; width:370px; padding:0; margin:0;">
		<?php echo $form->labelEx($model,'cod_custo'); ?>
		<?php echo $form->dropDownList($model,'cod_custo', cad_custo::loadTableCusto()); ?>
		<?php echo $form->error($model,'cod_custo'); ?>
	</div>

	<div class="row" style="text-align:right; width:370px; padding:0; margin:0;">

		<?php echo $form->labelEx($model,'complemento'); ?>
		<?php  echo $form->textArea($model,'complemento'); ?>
		<?php echo $form->error($model,'complemento'); ?>
	</div>
                     Complemento Ex.
                 <br>Número do cheque
                 <br>Valor
                 <br>Nome do Cliente        
        
	<div class="row" style="text-align:right; width:370px; padding:0; margin:0;">
		<?php echo $form->labelEx($model,'baixa'); ?>
		<?php  echo $form->dropDownList($model,'baixa',Lookup::items('Baixa')); ?>
		<?php echo $form->error($model,'baixa'); ?>
	</div>

	<div class="row" style="text-align:right; width:370px; padding:0; margin:0;">
		<?php echo $form->labelEx($model,'nome'); ?>
		<?php echo $form->textField($model,'nome'); ?>
		<?php echo $form->error($model,'nome'); ?>
	</div> 
        
	<div class="row" style="text-align:right; width:370px; padding:0; margin:0;">
		<?php echo $form->labelEx($model,'parcelas'); ?>
		<?php echo $form->textField($model,'parcelas',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'parcelas'); ?>
	</div>        
        
	<div class="row" style="text-align:right; width:370px; padding:0; margin:0;">
		<?php echo $form->labelEx($model,'valor'); ?>
		<?php echo $form->textField($model,'valor',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'valor'); ?>
	</div>

	<div class="row buttons" style="text-align:center; margin-bottom:0px; position:relative; clear:both; padding-top:25px;">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Salvar' : 'Salvar'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->